﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;

namespace Admin.NET.Application;

/// <summary>
/// 进货退货基础输入参数
/// </summary>
public class SysreturnorderBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }
    
    /// <summary>
    /// 退货单号
    /// </summary>
    [Required(ErrorMessage = "退货单号不能为空")]
    public virtual string Code { get; set; }
    
    /// <summary>
    /// 单据状态
    /// </summary>
    [Required(ErrorMessage = "单据状态不能为空")]
    public virtual int? DocumentStatus { get; set; }
    
    /// <summary>
    /// 退货日期
    /// </summary>
    [Required(ErrorMessage = "退货日期不能为空")]
    public virtual DateTime ReturnDate { get; set; }
    
    /// <summary>
    /// 进货单号
    /// </summary>
    public virtual string? PurchaseOrderNumber { get; set; }
    
    /// <summary>
    /// 供应商
    /// </summary>
    public virtual string? Supplier { get; set; }
    
    /// <summary>
    /// 联系人
    /// </summary>
    public virtual string? ContactPerson { get; set; }
    
    /// <summary>
    /// 联系方式
    /// </summary>
    public virtual string? ContactMethod { get; set; }
    
    /// <summary>
    /// 进货部门Id
    /// </summary>
    public virtual long? PurchaseDeptId { get; set; }
    
    /// <summary>
    /// 进货人Id
    /// </summary>
    public virtual long? PurchaserId { get; set; }
    
    /// <summary>
    /// 退货原因
    /// </summary>
    public virtual string? ReturnReason { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    public virtual string? Remark { get; set; }
    
    /// <summary>
    /// 软删除时间
    /// </summary>
    public virtual DateTime? DeleteTime { get; set; }
    
}

/// <summary>
/// 进货退货分页查询输入参数
/// </summary>
public class PageSysreturnorderInput : BasePageInput
{
    /// <summary>
    /// 退货单号
    /// </summary>
    public string Code { get; set; }
    
    /// <summary>
    /// 单据状态
    /// </summary>
    public int? DocumentStatus { get; set; }
    
    /// <summary>
    /// 退货日期范围
    /// </summary>
     public DateTime?[] ReturnDateRange { get; set; }
    
    /// <summary>
    /// 进货单号
    /// </summary>
    public string? PurchaseOrderNumber { get; set; }
    
    /// <summary>
    /// 供应商
    /// </summary>
    public string? Supplier { get; set; }
    
    /// <summary>
    /// 联系人
    /// </summary>
    public string? ContactPerson { get; set; }
    
    /// <summary>
    /// 联系方式
    /// </summary>
    public string? ContactMethod { get; set; }
    
    /// <summary>
    /// 进货部门Id
    /// </summary>
    public long? PurchaseDeptId { get; set; }
    
    /// <summary>
    /// 进货人Id
    /// </summary>
    public long? PurchaserId { get; set; }
    
    /// <summary>
    /// 退货原因
    /// </summary>
    public string? ReturnReason { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    public string? Remark { get; set; }
    
    /// <summary>
    /// 软删除时间范围
    /// </summary>
     public DateTime?[] DeleteTimeRange { get; set; }
    
    /// <summary>
    /// 选中主键列表
    /// </summary>
     public List<long> SelectKeyList { get; set; }
}

/// <summary>
/// 进货退货增加输入参数
/// </summary>
public class AddSysreturnorderInput
{
    /// <summary>
    /// 退货单号
    /// </summary>
    [Required(ErrorMessage = "退货单号不能为空")]
    [MaxLength(64, ErrorMessage = "退货单号字符长度不能超过64")]
    public string Code { get; set; }
    
    /// <summary>
    /// 单据状态
    /// </summary>
    [Required(ErrorMessage = "单据状态不能为空")]
    public int? DocumentStatus { get; set; }
    
    /// <summary>
    /// 退货日期
    /// </summary>
    [Required(ErrorMessage = "退货日期不能为空")]
    public DateTime ReturnDate { get; set; }
    
    /// <summary>
    /// 进货单号
    /// </summary>
    [MaxLength(64, ErrorMessage = "进货单号字符长度不能超过64")]
    public string? PurchaseOrderNumber { get; set; }
    
    /// <summary>
    /// 供应商
    /// </summary>
    [MaxLength(128, ErrorMessage = "供应商字符长度不能超过128")]
    public string? Supplier { get; set; }
    
    /// <summary>
    /// 联系人
    /// </summary>
    [MaxLength(64, ErrorMessage = "联系人字符长度不能超过64")]
    public string? ContactPerson { get; set; }
    
    /// <summary>
    /// 联系方式
    /// </summary>
    [MaxLength(32, ErrorMessage = "联系方式字符长度不能超过32")]
    public string? ContactMethod { get; set; }
    
    /// <summary>
    /// 进货部门Id
    /// </summary>
    public long? PurchaseDeptId { get; set; }
    
    /// <summary>
    /// 进货人Id
    /// </summary>
    public long? PurchaserId { get; set; }
    
    /// <summary>
    /// 退货原因
    /// </summary>
    [MaxLength(256, ErrorMessage = "退货原因字符长度不能超过256")]
    public string? ReturnReason { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    [MaxLength(512, ErrorMessage = "备注字符长度不能超过512")]
    public string? Remark { get; set; }
    
    /// <summary>
    /// 软删除时间
    /// </summary>
    public DateTime? DeleteTime { get; set; }
    
}

/// <summary>
/// 进货退货删除输入参数
/// </summary>
public class DeleteSysreturnorderInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
}

/// <summary>
/// 进货退货更新输入参数
/// </summary>
public class UpdateSysreturnorderInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
    /// <summary>
    /// 退货单号
    /// </summary>    
    [Required(ErrorMessage = "退货单号不能为空")]
    [MaxLength(64, ErrorMessage = "退货单号字符长度不能超过64")]
    public string Code { get; set; }
    
    /// <summary>
    /// 单据状态
    /// </summary>    
    [Required(ErrorMessage = "单据状态不能为空")]
    public int? DocumentStatus { get; set; }
    
    /// <summary>
    /// 退货日期
    /// </summary>    
    [Required(ErrorMessage = "退货日期不能为空")]
    public DateTime ReturnDate { get; set; }
    
    /// <summary>
    /// 进货单号
    /// </summary>    
    [MaxLength(64, ErrorMessage = "进货单号字符长度不能超过64")]
    public string? PurchaseOrderNumber { get; set; }
    
    /// <summary>
    /// 供应商
    /// </summary>    
    [MaxLength(128, ErrorMessage = "供应商字符长度不能超过128")]
    public string? Supplier { get; set; }
    
    /// <summary>
    /// 联系人
    /// </summary>    
    [MaxLength(64, ErrorMessage = "联系人字符长度不能超过64")]
    public string? ContactPerson { get; set; }
    
    /// <summary>
    /// 联系方式
    /// </summary>    
    [MaxLength(32, ErrorMessage = "联系方式字符长度不能超过32")]
    public string? ContactMethod { get; set; }
    
    /// <summary>
    /// 进货部门Id
    /// </summary>    
    public long? PurchaseDeptId { get; set; }
    
    /// <summary>
    /// 进货人Id
    /// </summary>    
    public long? PurchaserId { get; set; }
    
    /// <summary>
    /// 退货原因
    /// </summary>    
    [MaxLength(256, ErrorMessage = "退货原因字符长度不能超过256")]
    public string? ReturnReason { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>    
    [MaxLength(512, ErrorMessage = "备注字符长度不能超过512")]
    public string? Remark { get; set; }
    
    /// <summary>
    /// 软删除时间
    /// </summary>    
    public DateTime? DeleteTime { get; set; }
    
}

/// <summary>
/// 进货退货主键查询输入参数
/// </summary>
public class QueryByIdSysreturnorderInput : DeleteSysreturnorderInput
{
}

/// <summary>
/// 进货退货数据导入实体
/// </summary>
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
public class ImportSysreturnorderInput : BaseImportInput
{
    /// <summary>
    /// 退货单号
    /// </summary>
    [ImporterHeader(Name = "*退货单号")]
    [ExporterHeader("*退货单号", Format = "", Width = 25, IsBold = true)]
    public string Code { get; set; }
    
    /// <summary>
    /// 单据状态
    /// </summary>
    [ImporterHeader(Name = "*单据状态")]
    [ExporterHeader("*单据状态", Format = "", Width = 25, IsBold = true)]
    public int? DocumentStatus { get; set; }
    
    /// <summary>
    /// 退货日期
    /// </summary>
    [ImporterHeader(Name = "*退货日期")]
    [ExporterHeader("*退货日期", Format = "", Width = 25, IsBold = true)]
    public DateTime ReturnDate { get; set; }
    
    /// <summary>
    /// 进货单号
    /// </summary>
    [ImporterHeader(Name = "进货单号")]
    [ExporterHeader("进货单号", Format = "", Width = 25, IsBold = true)]
    public string? PurchaseOrderNumber { get; set; }
    
    /// <summary>
    /// 供应商
    /// </summary>
    [ImporterHeader(Name = "供应商")]
    [ExporterHeader("供应商", Format = "", Width = 25, IsBold = true)]
    public string? Supplier { get; set; }
    
    /// <summary>
    /// 联系人
    /// </summary>
    [ImporterHeader(Name = "联系人")]
    [ExporterHeader("联系人", Format = "", Width = 25, IsBold = true)]
    public string? ContactPerson { get; set; }
    
    /// <summary>
    /// 联系方式
    /// </summary>
    [ImporterHeader(Name = "联系方式")]
    [ExporterHeader("联系方式", Format = "", Width = 25, IsBold = true)]
    public string? ContactMethod { get; set; }
    
    /// <summary>
    /// 进货部门Id
    /// </summary>
    [ImporterHeader(Name = "进货部门Id")]
    [ExporterHeader("进货部门Id", Format = "", Width = 25, IsBold = true)]
    public long? PurchaseDeptId { get; set; }
    
    /// <summary>
    /// 进货人Id
    /// </summary>
    [ImporterHeader(Name = "进货人Id")]
    [ExporterHeader("进货人Id", Format = "", Width = 25, IsBold = true)]
    public long? PurchaserId { get; set; }
    
    /// <summary>
    /// 退货原因
    /// </summary>
    [ImporterHeader(Name = "退货原因")]
    [ExporterHeader("退货原因", Format = "", Width = 25, IsBold = true)]
    public string? ReturnReason { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    [ImporterHeader(Name = "备注")]
    [ExporterHeader("备注", Format = "", Width = 25, IsBold = true)]
    public string? Remark { get; set; }
    
    /// <summary>
    /// 软删除时间
    /// </summary>
    [ImporterHeader(Name = "软删除时间")]
    [ExporterHeader("软删除时间", Format = "", Width = 25, IsBold = true)]
    public DateTime? DeleteTime { get; set; }
    
}
